package 作业文件.构造方法作业;

abstract class Instrument {
    public  abstract  void makeSound();
}
class Erhu extends  Instrument{

    @Override
    public void makeSound() {
        System.out.println("二胡拉拉");
    }
}
class Piano extends  Instrument{

    @Override
    public void makeSound() {
        System.out.println("钢琴顶顶顶");
    }
}
class Violin extends  Instrument{

    @Override
    public void makeSound() {
        System.out.println("小提琴哈哈哈");
    }
}